//
//  HWIncomeMingXiCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/10/10.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWIncomeMingXiCell.h"


@interface HWIncomeMingXiCell()
@property(strong,nonatomic)UILabel *datelabel;
@property(strong,nonatomic)UILabel *jifenLabe;
@property(strong,nonatomic)UILabel *xiugailabel;

@end

@implementation HWIncomeMingXiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self addUIview];
         self.backgroundColor = [UIColor whiteColor];
        
        
    }
    
    
    return  self;
    
}

- (void)addUIview {
    

     self.datelabel  = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, kScreenW/3, 36)];
     self.datelabel.text = @"2019-09-18\n14:00:00";
     self.datelabel.font = [UIFont systemFontOfSize:10];
     self.datelabel.textColor = RGB(102,102,102);
     self.datelabel.numberOfLines = 2;
     self.datelabel.textAlignment = NSTextAlignmentCenter;
     [self.contentView addSubview:self.datelabel];
    
    
    self.jifenLabe  = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW/3, 0, kScreenW/3, 36)];
    self.jifenLabe.text = @"+50";
    self.jifenLabe.font = [UIFont systemFontOfSize:10];
    self.jifenLabe.textColor = RGB(102,102,102);
    self.jifenLabe.numberOfLines = 2;
    self.jifenLabe.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.jifenLabe];
    
    
     self.xiugailabel  = [[UILabel alloc]initWithFrame:CGRectMake(kScreenW/3*2, 0, kScreenW/3, 36)];
     self.xiugailabel.text = @"新手任务—修改头像";
     self.xiugailabel.font = [UIFont systemFontOfSize:10];
     self.xiugailabel.textColor = RGB(102,102,102);
     self.xiugailabel.numberOfLines = 2;
     self.xiugailabel.textAlignment = NSTextAlignmentCenter;
     [self.contentView addSubview:self.xiugailabel];
     

    
    
    UIView *fengexianview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, 1)];
    fengexianview.backgroundColor = RGB(232, 232, 242);
    [self.contentView addSubview:fengexianview];
    
    UIView *shuxian1 = [[UIView alloc]initWithFrame:CGRectMake(kScreenW/3, 0, 1,36)];
       shuxian1.backgroundColor = RGB(232, 232, 242);
       [self.contentView addSubview:shuxian1];
       
     UIView *shuxian2 = [[UIView alloc]initWithFrame:CGRectMake(kScreenW/3*2, 0, 1, 36)];
     shuxian2.backgroundColor = RGB(232, 232, 242);
     [self.contentView addSubview:shuxian2];
    
    
        
}

-(void)setModel:(HWJiFenMingXiModel *)model {
    
    _model = model;
    self.datelabel.text  = [NSString stringWithFormat:@"%@\n%@",model.t1,model.t2];
    self.jifenLabe.text = [NSString stringWithFormat:@"+%@",model.points ];
    self.xiugailabel.text  = [NSString stringWithFormat:@"%@",model.type_name];
    
    
    
}

-(void)setZhichumodel:(HWJiFenMingXiModel *)zhichumodel {
    
    _zhichumodel = zhichumodel;
    
    self.datelabel.text  = [NSString stringWithFormat:@"%@\n%@",zhichumodel.t1,zhichumodel.t2];
    self.jifenLabe.text = [NSString stringWithFormat:@"-%@",zhichumodel.points ];
    self.xiugailabel.text  = [NSString stringWithFormat:@"%@",zhichumodel.type_name];
    
}


-(void)setDataDic:(NSDictionary *)dataDic {
    
    _dataDic = dataDic;
    
    self.datelabel.text = [NSString stringWithFormat:@"%@",dataDic[@"reg_time"]];
    self.jifenLabe.text =  [NSString stringWithFormat:@"%@",dataDic[@"username"]];
    
      self.xiugailabel.text = [NSString stringWithFormat:@"%@",dataDic[@"pay"]];
}




-(void)setZhangdanMolde:(HWJiFenMingXiModel *)zhangdanMolde {
    
    _zhichumodel = zhangdanMolde;
    
    
    self.datelabel.text  = [NSString stringWithFormat:@"%@\n%@",zhangdanMolde.t1,zhangdanMolde.t2];
    self.jifenLabe.text = [NSString stringWithFormat:@"%@",zhangdanMolde.money ];
    self.xiugailabel.text  = [NSString stringWithFormat:@"%@",zhangdanMolde.payment];
    
    
    
    
    
}




@end
